<div class="btn-group pull-right" style="margin-right: 10px">
    <a class="btn btn-sm btn-default" href="/xqc/sales-report/monthly-ct-download" target="_blank"><i class="fa fa-download"></i> 导出目标</a>
</div>
@if(\Encore\Admin\Facades\Admin::user()->inRoles(['administrator','sales-director','sales-executive','jp-salesperson'])) 
<div class="btn-group pull-right" style="margin-right: 10px">
    <a class="btn btn-sm btn-info" href="/xqc/sales-report/monthly-ct-upload"><i class="fa fa-upload"></i>&nbsp;导入目标</a>
</div>
@endif
<div class="btn-group pull-right" style="margin-right: 10px">
    <a class="btn btn-sm btn-twitter" href="{{ $downloadUrl }}" target="_blank"><i class="fa fa-download"></i> 按当前值导出</a>
</div>
<div class="btn-group pull-right" style="margin-right: 10px">
{{--    <button class="btn btn-sm btn-warning ex-modal"><i class="fa fa-download"></i>&nbsp;按时间范围导出</button>--}}
</div>
<div class="modal fade" id="exModal" data-backdrop="static" data-keyboard="false">
    <div class="modal-dialog">
        <div class="modal-content">
        </div><!-- /.modal-content -->
    </div><!-- /.modal-dialog -->
</div><!-- /.modal -->

<script language="JavaScript" type="text/javascript">
    $(function () {
        $('.ex-modal').on('click', function(e) {
            e.preventDefault();
            $("#exModal").modal({
                remote : '/xqc/sales-report/monthly-modal?action=exportView',
            });
        });
        $("#exModal").on("hidden.bs.modal", function() {
            $(this).removeData("bs.modal");
            $(this).find(".modal-content").children().remove();
        });
    });
</script>
